<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>添加家庭成员</title>
	<jsp:include page="/com/common/_js.jsp"></jsp:include>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#addfd").click(function(){
			var size=$("fieldset").size();
			var fieldset=$("<fieldset id='g"+size+"'></fieldset>");
			fieldset.append($("#g0").html()).appendTo($("form")).after($(":submit"));
			$("label","#g"+size).each(function(){
				$(this).attr("for",$(this).attr("for").replace("0",size));
			});
			$("input","#g"+size).each(function(){
				$(this).attr("id",$(this).attr("id").replace("0",size));
				$(this).attr("name",$(this).attr("name").replace("0",size));
			});
		});
		
		$("#cancel").click(function(){
			var size=$("fieldset").size()-1;
			if(size>0){
				$("#g"+size).remove();
			}
		});
		
	});
	</script>
</head>
<body>
	<div id="web">
		<div id="head"></div>
		<div id="body">
			<div class="container-fluid">
			    <div class="row-fluid">
				    <div class="span2">
				    <jsp:include page="_left.jsp"></jsp:include>
				    </div>
				    <div class="span10">
				 		添加导游领队家庭成员<s:property value="#parameters.guideId"/>
						<s:property value="#guideId"/>  <a id="addfd">添加成员</a><br><a id="cancel">取消</a>
						<s:form action="guidefmAction!insertGuidefm.jspa" namespace="/officer">
							<fieldset id="g0">
								<s:hidden name="guidefmList[0].guideId" value="%{#parameters.guideId}"></s:hidden>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__name">姓名:</label>
									<input type="text" id="guidefmAction_guidefmList_0__name" name="guidefmList[0].name">
								</div>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__relative">成员关系:</label>
									<input type="text" id="guidefmAction_guidefmList_0__relative" name="guidefmList[0].relative">
								</div>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__birthday">生日:</label>
									<input type="text" id="guidefmAction_guidefmList_0__birthday" name="guidefmList[0].birthday">
								</div>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__workUnit">工作单位:</label>
									<input type="text" id="guidefmAction_guidefmList_0__workUnit" name="guidefmList[0].workUnit">
								</div>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__career">职业:</label>
									<input type="text" id="guidefmAction_guidefmList_0__career" name="guidefmList[0].career">
								</div>
								<div class="field">
									<label for="guidefmAction_guidefmList_0__phonenum">联系电话:</label>
									<input type="text" id="guidefmAction_guidefmList_0__phonenum" name="guidefmList[0].phonenum">
								</div>
					
							</fieldset>
							<div class="button">
								<s:submit value="提交"></s:submit>
							</div>
						</s:form>
				    </div>
			    </div>
			</div>
		</div>
		<div id="foot"></div>
	</div>
</body>
</html>